import React, { useState, useEffect } from 'react'
import store from './redux/store'
export default function (Comp) {
  return function Far(props) {
    const [a, setA] = useState(0)

    useEffect(() => {
      store.subscribe(() => {
        //   console.log('store的数据改变了', store.getState())
        setA((a) => a + 1)
      })
    }, [])
    return <Comp {...props}></Comp>
  }
}
